home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / wired movies and sprites / addhtactions / addhtactions.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.0 KB  |  115 lines

  1. //////////
  2. //
  3. //    File:        AddHTActions.h
  4. //
  5. //    Contains:    Sample code for adding hypertext links to a QuickTime movie with a text track.
  6. //
  7. //    Written by:    Tim Monroe
  8. //                Based on existing code by Bill Wright
  9. //
  10. //    Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //    Change History (most recent first):
  13. //
  14. //       <1>         07/19/99    rtm        first file from bw
  15. //       
  16. //////////
  17.  
  18.  
  19. //////////
  20. //
  21. // header files
  22. //
  23. //////////
  24.  
  25. #ifndef __MACTYPES__
  26. #include <MacTypes.h>
  27. #endif
  28.  
  29. #ifndef __ENDIAN__
  30. #include <Endian.h>
  31. #endif
  32.  
  33. #ifndef __MOVIES__
  34. #include <Movies.h>
  35. #endif
  36.  
  37. #ifndef __MACMEMORY__
  38. #include <MacMemory.h>
  39. #endif
  40.  
  41. #ifndef _STRING_H
  42. #include <string.h>
  43. #endif
  44.  
  45. #ifndef __FONTS__
  46. #include <Fonts.h>
  47. #endif
  48.  
  49. #ifndef __MOVIES__
  50. #include <Movies.h>
  51. #endif
  52.  
  53. #ifndef __FIXMATH__
  54. #include <FixMath.h>
  55. #endif
  56.  
  57. // Windows-specific header files
  58. #if TARGET_OS_WIN32
  59.  
  60.     #ifndef __QTML__
  61.     #include <QTML.h>
  62.     #endif
  63.     
  64.     #include <windows.h>
  65.     
  66. #endif
  67.  
  68.  
  69. //////////
  70. //
  71. // constants
  72. //
  73. //////////
  74.  
  75. #define kIDOne                        1
  76. #define kIDTwo                        2
  77.  
  78. #define kIndexZero                    0
  79. #define kIndexOne                    1
  80. #define kZeroDataLength                0
  81.  
  82. #define kWidth320                    320
  83. #define kHeight240                    240
  84.  
  85. #define kTrackVolumeZero            0
  86.  
  87. #define kTimeScale600                600
  88.  
  89. #define kTrackStartTimeZero            0
  90. #define kMediaStartTimeZero            0
  91.  
  92. #define kTextBoxInset                2
  93.  
  94. #define kSize48                        48
  95. #define kFacePlain                    0
  96.  
  97. #define kHyperTextTextAtomType        FOUR_CHAR_CODE('htxt')
  98. #define kTextWiredObjectsAtomType    FOUR_CHAR_CODE('wtxt')
  99. #define kHyperTextItemAtomType        FOUR_CHAR_CODE('htxt')
  100. #define kRangeStart                    FOUR_CHAR_CODE('strt')
  101. #define kRangeEnd                    FOUR_CHAR_CODE('end ')
  102.  
  103.  
  104. //////////
  105. //
  106. // function prototypes
  107. //
  108. //////////
  109.  
  110. static OSErr                            AddHTAct_CreateTextMovie (FSSpec *theFSSpec);
  111. static OSErr                            AddHTAct_CreateHyperTextActionContainer (QTAtomContainer *theActions);
  112. static OSErr                            AddHTAct_AddHyperActionsToSample (Handle theSample, QTAtomContainer theActions);
  113. static OSErr                            AddHTAct_AddHyperTextToTextMovie (FSSpec *theFSSpec);
  114.  
  115.